# detecting a geometry form

# definitions ------------------------------------

# function detect

def what_is_the_object( geo_form ):

    description = forms[ geo_form.get_edges_count() ]
    print description
    
# forms dictionary

forms = {

      3: "This is a triangle."
    , 4: "This is a square."
    , 5: "Pentagono."
    , 6: "Hexagono."
    , 7: "Heptagono."
    , 8: "Octogono."

}

# Geo class

class GeoForm():

    def __init__(self, sides):
        self.sides = sides

    def get_edges_count(self):
        return self.sides

# implementations ------------------------------------

form1 = GeoForm(3)
form2 = GeoForm(4)
form3 = GeoForm(5)
form4 = GeoForm(6)
form5 = GeoForm(7)
form6 = GeoForm(8)

what_is_the_object ( form1 )
what_is_the_object ( form2 )
what_is_the_object ( form3 )
what_is_the_object ( form4 )
what_is_the_object ( form5 )
what_is_the_object ( form6 )

    
